<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>系统日志</title>
    <link rel="stylesheet" type="text/css" href="/static/jquery-easyui-1.5.5.4/themes/metro/easyui.css"></link>
    <link rel="stylesheet" type="text/css" href="/static/jquery-easyui-1.5.5.4/themes/icon.css"></link>
    <script type="text/javascript" src="/static/jquery-easyui-1.5.5.4/jquery.min.js"></script>
    <script type="text/javascript" src="/static/jquery-easyui-1.5.5.4/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/jquery-easyui-1.5.5.4/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">

        var url;

        function formatUser(val, row) {
            return val.trueName + "&nbsp;(" + val.userName + ")&nbsp;";
        }


        function searchLog() {
            $("#dg").datagrid('load', {
                "type": $("#s_type").combobox("getValue"),
                "user.trueName": $("#s_trueName").val(),
                "btime": $("#s_btime").datetimebox("getValue"),
                "etime": $("#s_etime").datetimebox("getValue")
            });
        }

        function resetValue() {
            $("#s_type").combobox("setValue", "");
            $("#s_trueName").val("");
            $("#s_btime").datetimebox("setValue", "");
            $("#s_etime").datetimebox("setValue", "");
        }

    </script>
</head>
<body style="margin: 1px">
<table id="dg" title="系统日志" class="easyui-datagrid"
       fitColumns="true" pagination="true" rownumbers="true" singleSelect="true"
       url="/admin/log/list" fit="true" toolbar="#tb">
    <thead>
    <th field="id" width="20" align="center">编号</th>
    <th field="type" width="30" align="center">日志类型</th>
    <th field="user" width="50" align="center" formatter="formatUser">操作用户</th>
    <th field="time" width="50" align="center">操作时间</th>
    <th field="content" width="250" align="left">操作内容</th>
    </thead>
</table>

<div id="tb">
    <fieldset style="border-color: #E7F0FF">
        <legend>查询设置</legend>
        &nbsp;查询设置&nbsp;
        <select class="easyui-combobox" id="s_type" style="width: 154px" editable="false" panelHeight="auto">
            <option value="">所有类型</option>
            <option value="登录操作">登录操作</option>
            <option value="注销操作">注销操作</option>
            <option value="查询操作">查询操作</option>
            <option value="更新操作">更新操作</option>
            <option value="添加操作">添加操作</option>
            <option value="删除操作">删除操作</option>
        </select>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作用户：&nbsp;
        <input type="text" id="s_trueName" size="20" onkeydown="if(event.keyCode==13) searchLog()"/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作时间：&nbsp;
        <input id="s_btime" class="easyui-datetimebox" editable=false style="width:150px"/>
        &nbsp;&nbsp;-&nbsp;&nbsp;
        <input id="s_etime" class="easyui-datetimebox" editable=false style="width:150px"/>
        &nbsp;&nbsp;<a href="javascript:searchLog()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
        &nbsp;&nbsp;<a href="javascript:resetValue()" class="easyui-linkbutton" iconCls="icon-reset" plain="true">重置</a>
    </fieldset>
</div>


</body>
</html>